package com.googlecode.lazyrecords.chronicle.mappings;

import com.googlecode.lazyrecords.mappings.StringMappings;
import com.higherfrequencytrading.chronicle.Excerpt;

public class ObjectMapping implements ChronicleMapping<Object> {
    private final Class aClass;
    private final StringMappings stringMappings;

    public ObjectMapping(Class aClass, StringMappings stringMappings) {
        this.aClass = aClass;
        this.stringMappings = stringMappings;
    }

    @Override
    public void write(Object value, Excerpt excerpt) {
        excerpt.writeObject(value);
    }

    @Override
    public Object read(Excerpt excerpt) {
        return excerpt.readObject();
    }
}
